import socket,sys

dest = ('<broadcast>',51423)

s = socket.socket(socket.AF_INET,socket.SOCK_DGRAM)
s.setsockopt(socket.SOL_SOCKET,socket.SO_BROADCAST,1)
s.sendto("hello world",dest)

print "looking for replies : press Ctrl-c to stop"

while True:
	(buf,address) = s.recvfrom(2048)
    	if not len(buf):
	    break
	print "recived from %s : %s " %(address,buf)

